/**
 * 同步本地中奖用户
 */
$(function(){

  var timer = setInterval(function(){

    if(!$('#lotteryDataJsonBox').length) {
      common.log("screen.message: JSON.parse failed");
      return;
    }

    var dataJson = $('#lotteryDataJsonBox').text().trim();
    try {
      dataJson = JSON.parse(dataJson);
    } catch(e) {
      common.log("screen.message: JSON.parse failed");
      return;
    }

    if(!dataJson || !dataJson.companyId) {
      common.log("screen.message: dataJson is empty", dataJson);
    }

    common.send({"func": "syncLocalLotteryData", data: dataJson}, function(res){
      common.log(res);
    });

  }, 1000);



});